package com.chb.command;

/**
 * @author chihb
 * @create-time 2024/10/27 8:02
 * @description
 */
public class Test {
    public static void main(String[] args) {
        Invoker invoker = new Invoker();
        LightOffCommand lightOffCommand = new LightOffCommand(new Light());
        invoker.setCommand(lightOffCommand);
        invoker.pressButton();

        LightOnCommand lightOnCommand = new LightOnCommand(new Light());
        invoker.setCommand(lightOnCommand);
        invoker.pressButton();
    }
}
